﻿<!--{inc(header.view.html)}-->

<div class="header">    
  
                       <div class="nav">
	                                 <ul id="nav_list">
                                                 <li><a href="index.php?app=vote&act=index" target="mainframe">投票列表</a></li>                                     
                                                 <li><a  href="#" class="nav_icon"  target="mainframe">创建投票</a></li>                                     



	                                 </ul>
                       </div>
                
</div>



<div id="content">
                   <h1>创建投票</h1>

                  <div>
                                    <div class="tips_show"><img  src="{$web_view_dir}style/images/light.gif" align="absmiddle" /> <b>提示: </b>
                                                                  <span ></span>
                                    </div>


                                 
                                 
<table width="100%" border="0" cellspacing="1" cellpadding="3" class="table_style">
  <form name="form1" method="post" action="?app=vote&act=addpost">
    <tr class="head"> 
      <td colspan="2" height="23">创建投票</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="16%">投票项目名称: </td>
      <td width="84%"> 
        <input type="text" name="data[name]" value="" size="40">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="16%">投票类型:</td>
      <td width="84%"> 
        <phpscup:form type='radio' value='单选:1|多选:2' name='data[type]'  appname='vote'  />	  
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="16%">是否做时间限制:<br>
        不做限制请留空,否则请输入限制每次投票的时间间隔</td>
      <td width="84%"> 
	  <input type="text" name="data[limittime]" value="" size="10"> 
  
        单位分钟 </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="16%">是否限制IP重复投票:</td>
      <td width="84%"> 
	   <phpscup:form type='radio' value='限制:1|不限制:0' name='data[limitip]'  appname='vote'  />
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="16%">是否禁止游客投票:</td>
      <td width="84%"> 
	   <phpscup:form type='radio' value='限制:1|不限制:0' name='data[forbidguestvote]'  appname='vote'  />
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="16%">投票的时间期限:<br>
        (留空不做限制)</td>
      <td width="84%">开始日期: 
	  <phpscup:form type='time' size='10' name='data[begintime]'  appname='vote'   />	
        格式:2007-02-02 12:12:23<br>
        结束日期: 
		<phpscup:form type='time' size='10' name='data[endtime]'  appname='vote'   />
        格式:2007-02-02 12:12:23 </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td> 投票描述:</td>
      <td> 
        <textarea name="data[about]" cols="60" rows="5"></textarea>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2">投票选项 
        <input type="text" name="textfield" value="1" size="5" id="addnum">
        <input type="button" name="Submit3" value="再增加几项" onclick="addvote();">
        <input type="hidden" name="hiddenField" value="5" id="num_s">
      </td>
    </tr>
   
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2"> 第1项 标题: 
        <input type="text" name="data[1][title]"> 票数:<input type="text" name="data[1][votenum]" size="10">
		<br>
        图片:<phpscup:form type='ouppic' width='370' height='150' scrolling='no' frameborder='0' size='40' id='img1' name='data[1][img]'  appname='vote'   /> 
        <br>
        第2项 标题: 
        <input type="text" name="data[2][title]"> 票数:<input type="text" name="data[2][votenum]" size="10">
		<br>
        图片:<phpscup:form type='ouppic' width='370' height='150' scrolling='no' frameborder='0' size='40' id='img2' name='data[2][img]'  appname='vote'   />
		<br>
        第3项 标题: 
        <input type="text" name="data[3][title]"> 票数:<input type="text" name="data[3][votenum]" size="10">
		<br>
        图片:<phpscup:form type='ouppic' width='370' height='150' scrolling='no' frameborder='0' size='40' id='img2' name='data[3][img]'  appname='vote'   />
		<br>
        第4项 标题: 
        <input type="text" name="data[4][title]"> 票数:<input type="text" name="data[4][votenum]" size="10">
        <br>
        图片:<phpscup:form type='ouppic' width='370' height='150' scrolling='no' frameborder='0' size='40' id='img2' name='data[4][img]'  appname='vote'   />
		<br>
        第5项 标题: 
        <input type="text" name="data[5][title]"> 票数:<input type="text" name="data[5][votenum]" size="10">
        <br>
        图片:<phpscup:form type='ouppic' width='370' height='150' scrolling='no' frameborder='0' size='40' id='img2' name='data[5][img]'  appname='vote'   />

        <div id="morevote"></div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2" align="center"> 
        <input type="hidden" name="id" value="">
        <input type="submit" name="Submit" value="提 交">

      </td>
    </tr>
  </form>
</table>
<SCRIPT LANGUAGE="JavaScript">
<!--
function addvote(){
	var str='';
	
	num=document.getElementById('addnum').value;
	num=parseInt(num);
	n=document.getElementById('num_s').value;
	document.getElementById('num_s').value=num+parseInt(n);
	min=parseInt(n)+1;
	max=parseInt(n)+num+1;
	for(var i=min;i<max;i++){
		str+='<br>第'+i+'项 标题:<input type="text" name="data['+i+'][title]"> 票数:<input type="text" name="data['+i+'][votenum]" size="10">  <br>图片:<input type="text"  value=""  name="data['+i+'][img]"  size="40"   id="UP_'+i+'.img"><br/><iframe name="MF_'+i+'.img"  frameborder=""  height="150"  scrolling="no"  width="370"  src="?app=vote&act=upfile&tf=pic&jsfun=UPF_upfile&putid=UP_'+i+'.img&id=&picurl=&edit=edit" ></iframe>';
	}
	document.getElementById('morevote').innerHTML+=str;
}
//-->
</SCRIPT>
                             
 
                                

                 </div>

</div>



<!--{inc(footer.view.html)}-->